import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import com.xctech.yace.util.FormatUtil;

import java.util.Arrays;

public class TimeUtil {
    public static void main(String[] args) {
        //        Long start = System.nanoTime();
//        Object s ="123";
//        if(s instanceof String){
//            String s1 = (String)s;
//        }
//        Long end = System.nanoTime();
//        Double aDouble = com.xctech.yace.util.TimeUtil.calInterval(start, end);
//        System.out.println(aDouble);

//        String s = "{\"ORDE_ONUM\":\"20210622_1_209854\",\"ORDE_TYPE\":1,\"ORDE_STRT_DATE\":20210622,\"ORDE_END_DATE\":20210622,\"ORDE_STRT_TIME\":1,\"ORDE_END_TIME\":235900,\"ORDE_SCR_CTRL_TYPE\":2,\"ODRE_SCR_REAL\":[{\"ORDE_SCR_ONUM\":\"20210622_1_209854_1_1\",\"ORDE_ASSO_ONUM\":\"20210622_1_209854_5000_6933_20085_1000120506_1_01000100\",\"PD_ID\":5000,\"AST_UNIT_ID\":6933,\"PFL_ID\":20085,\"ACC_ID\":20085,\"SHAD_CD\":null,\"IVSM_TYPE\":1,\"BUSI_CLAS\":\"010001\",\"BUSI_TYPE\":\"01000100\",\"SCR_INCD\":1000120506,\"MKT_NO\":1,\"SCR_CODE\":\"120506\",\"LAS_ID\":\"1\",\"CRRC\":344,\"CLR_SPED\":1,\"TRD_PLFM\":3,\"ENTR_DIR\":3,\"ORDE_PRC_TYPE\":1,\"ORDE_PRC\":90.0,\"RATE\":null,\"ORDE_VOL\":1000.0,\"ORDE_AMT\":90000.0,\"TRD_CNTP_ID\":100949,\"RELA_RRSN\":99991000,\"AGT_RELA_RRSN\":99991000,\"MEMO\":null,\"CONT_DAYS\":null,\"INTA_DAYS\":null,\"CONT_MTCH_DATE\":null,\"CONT_END_DATE\":null,\"FST_DELI_DATE\":null,\"END_DELI_DATE\":null,\"FST_DELI_MODE\":null,\"END_DELI_MODE\":null,\"BUYB_AMT\":null,\"INTR\":null,\"OPER_TYPE\":0,\"ORDE_STAT\":1}],\"XID\":\"0x0009.012.00003dc3\",\"EVT_ONUM\":2021111200000056,\"SYS_ID\":1,\"TRD_SRC_ID\":\"0|20210622_1_2098540|0\",\"SERV_OPER_TYPE\":201,\"OCCU_DATE\":20210622,\"OCCU_TIME\":20756,\"OPER_TIME\":1636702536850000}\n";
//        String s1 = "{\"ORDE_ONUM\":\"20210622_1_209854\",\"ORDE_TYPE\":1,\"ORDE_STRT_DATE\":20210622,\"ORDE_END_DATE\":20210622,\"ORDE_STRT_TIME\":1,\"ORDE_END_TIME\":235900,\"ORDE_SCR_CTRL_TYPE\":2,\"ODRE_SCR_REAL\":[{\"ORDE_SCR_ONUM\":\"20210622_1_209854_1_1\",\"ORDE_ASSO_ONUM\":\"20210622_1_209854_5000_6933_20085_1000120506_1_01000100\",\"PD_ID\":5000,\"AST_UNIT_ID\":6933,\"PFL_ID\":20085,\"ACC_ID\":20085,\"SHAD_CD\":null,\"IVSM_TYPE\":1,\"BUSI_CLAS\":\"010001\",\"BUSI_TYPE\":\"01000100\",\"SCR_INCD\":1000120506,\"MKT_NO\":1,\"SCR_CODE\":\"120506\",\"LAS_ID\":\"1\",\"CRRC\":344,\"CLR_SPED\":1,\"TRD_PLFM\":3,\"ENTR_DIR\":3,\"ORDE_PRC_TYPE\":1,\"ORDE_PRC\":90.0,\"RATE\":null,\"ORDE_VOL\":1000.0,\"ORDE_AMT\":90000.0,\"TRD_CNTP_ID\":100949,\"RELA_RRSN\":99991000,\"AGT_RELA_RRSN\":99991000,\"MEMO\":null,\"CONT_DAYS\":null,\"INTA_DAYS\":null,\"CONT_MTCH_DATE\":null,\"CONT_END_DATE\":null,\"FST_DELI_DATE\":null,\"END_DELI_DATE\":null,\"FST_DELI_MODE\":null,\"END_DELI_MODE\":null,\"BUYB_AMT\":null,\"INTR\":null,\"OPER_TYPE\":0,\"ORDE_STAT\":1}],\"XID\":\"0x0009.012.00003dc3\",\"EVT_ONUM\":2021111200000056,\"SYS_ID\":1,\"TRD_SRC_ID\":\"0|20210622_1_2098540|0\",\"SERV_OPER_TYPE\":201,\"OCCU_DATE\":20210622,\"OCCU_TIME\":20756,\"OPER_TIME\":1636702536850000}\n";
//        String s2 = s+"-----"+s1;
//        System.out.println(s2.split("-----")[0]);
//        System.out.println(s2.split("-----")[1]);
        //        JSONObject jsonObject = JSON.parseObject(s);
//        String format = FormatUtil.format(jsonObject.toString());
//        System.out.println(format);
//        JSONObject jsonObject1 = JSON.parseObject(format);
//        System.out.println(jsonObject1);

        String s = "{\n" +
                "  \"owner\": \"TRADE\",\n" +
                "  \"op\": 0,\n" +
                "  \"optype\": \"INSERT\",\n" +
                "  \"actseq\": \"2.196689\",\n" +
                "  \"xid\": \"0x0004.004.00003b8b\",\n" +
                "  \"name\": \"TINSTRUCTION\",\n" +
                "  \"after_key\": {\n" +
                "    \"L_INDEX_DAILY_MODIFY\": \"1\",\n" +
                "    \"L_DAILY_INSTRUCTION_NO\": \"209830\"\n" +
                "  },\n" +
                "  \"jstime\": \"1636707529929000\",\n" +
                "  \"after\": {\n" +
                "    \"VC_MAC\": \"5EF3354B2442\",\n" +
                "    \"L_BEGIN_TIME\": \"1\",\n" +
                "    \"L_COMBITEMPLATE_ID\": \"0\",\n" +
                "    \"C_APPROVE_STATUS\": \"2\",\n" +
                "    \"L_INDEX_MODIFY_INSTRUCTION\": \"0\",\n" +
                "    \"C_ARBI_TYPE\": \"0\",\n" +
                "    \"L_END_TIME\": \"235959\",\n" +
                "    \"L_INVEST_TIME\": \"0\",\n" +
                "    \"L_INVEST_ADVISER\": \"0\",\n" +
                "    \"C_SOURCE\": \"1\",\n" +
                "    \"C_RISK_APPROVE_STATUS\": \"2\",\n" +
                "    \"C_ENTRUST_RESTRICT\": \"2\",\n" +
                "    \"C_TARGET_TYPE\": \"1\",\n" +
                "    \"C_CANCEL_BRANCH_DEAL_STATUS\": \"0\",\n" +
                "    \"C_BUSIN_CLASS\": \"1\",\n" +
                "    \"VC_IP_ADDRESS\": \"192.168.0.17\",\n" +
                "    \"L_INVEST_DATE\": \"0\",\n" +
                "    \"L_END_DATE\": \"20210622\",\n" +
                "    \"C_OPERATOR_ASSESS\": \"1\",\n" +
                "    \"L_MODIFY_OPERATOR\": \"0\",\n" +
                "    \"L_ARBI_SETS\": \"0\",\n" +
                "    \"L_BUSIN_BEGIN_DATE\": \"20210622\",\n" +
                "    \"C_INSTRUCTION_TYPE\": \"2\",\n" +
                "    \"L_DEPT_ID\": \"0\",\n" +
                "    \"L_DAILY_INSTRUCTION_NO\": \"209830\",\n" +
                "    \"C_DEAL_EXECUTE_STATUS\": \"1\",\n" +
                "    \"UPDATED_TIME\": \"2021-06-22 11:31:49.000001\",\n" +
                "    \"EN_TARGET_BASE\": \"0\",\n" +
                "    \"L_APPROVE_DATE\": \"0\",\n" +
                "    \"L_BUSIN_END_DATE\": \"20210622\",\n" +
                "    \"L_HG_BATCH_NO\": \"0\",\n" +
                "    \"C_FAIR_TRADE\": \"1\",\n" +
                "    \"L_INSIDER_TRADING_NO\": \"0\",\n" +
                "    \"L_DISPENSE_DATE\": \"0\",\n" +
                "    \"C_ETF_AUTO\": \"0\",\n" +
                "    \"C_INSTRUCTION_LEVEL\": \"0\",\n" +
                "    \"L_FIRST_SETTLE_DATE\": \"0\",\n" +
                "    \"L_SCHEMA_ID\": \"0\",\n" +
                "    \"L_DIRECT_OPERATOR\": \"99991000\",\n" +
                "    \"D_DATETIME\": \"2021-06-22 11:31:49\",\n" +
                "    \"C_BRANCH_DEAL_STATUS\": \"0\",\n" +
                "    \"L_MODIFY_TIME\": \"0\",\n" +
                "    \"L_TRADE_RIVAL_NO\": \"0\",\n" +
                "    \"L_DISPENSE_OPERATOR\": \"0\",\n" +
                "    \"C_PAPERY_APPROVE\": \"0\",\n" +
                "    \"L_APPROVE_TIME\": \"0\",\n" +
                "    \"L_ADVISE_ID\": \"0\",\n" +
                "    \"L_DISPENSE_TIME\": \"0\",\n" +
                "    \"L_VOUCHPLAN_SERIAL_NO\": \"0\",\n" +
                "    \"L_APPROVE_BUSIN_DATE\": \"20210622\",\n" +
                "    \"L_ORG_ID\": \"0\",\n" +
                "    \"L_TOENTR_SETS\": \"0\",\n" +
                "    \"L_MODIFY_DATE\": \"0\",\n" +
                "    \"C_CANCEL_STATUS\": \"2\",\n" +
                "    \"L_INDEX_DAILY_MODIFY\": \"1\",\n" +
                "    \"L_BATCH_SERIAL_NO\": \"5532\",\n" +
                "    \"C_ENTRUST_EXECUTE_STATUS\": \"1\",\n" +
                "    \"C_POWER_TYPE\": \"2\",\n" +
                "    \"C_LOCK_FLAG\": \"0\",\n" +
                "    \"L_HG_DAYS\": \"0\",\n" +
                "    \"L_GROUP_ID\": \"0\",\n" +
                "    \"VC_TRADE_FLAG\": \"0000\",\n" +
                "    \"L_CANCEL_OPERATOR\": \"0\",\n" +
                "    \"L_BASECOMBI_ID\": \"2\",\n" +
                "    \"C_INSTRUCTION_STATUS\": \"1\",\n" +
                "    \"L_DIRECT_INSTEAD_OPERATOR\": \"99991000\",\n" +
                "    \"C_CANCEL_BRANCH_STATUS\": \"0\",\n" +
                "    \"EN_TARGET_VALUE\": \"17639\",\n" +
                "    \"C_QUOTE_SIDE\": \"0\",\n" +
                "    \"L_FUND_ID\": \"2\",\n" +
                "    \"VC_VOLSERIAL_NO\": \"WXC2AB00ZCRA\",\n" +
                "    \"C_ETF_MANUAL\": \"0\",\n" +
                "    \"C_TRADE_AGENT_FLAG\": \"0\",\n" +
                "    \"L_SETTLE_SPEED\": \"1\",\n" +
                "    \"L_DEFAULT_OPERATOR\": \"0\",\n" +
                "    \"C_QUOTE_TYPE\": \"0\",\n" +
                "    \"L_DIRECT_DATE\": \"20210622\",\n" +
                "    \"L_CANCEL_TIME\": \"0\",\n" +
                "    \"C_TARGET_BASE\": \"1\",\n" +
                "    \"L_CRMW_BATCH_SERIAL_NO\": \"0\",\n" +
                "    \"L_INDEX_LAST_MODIFY\": \"0\",\n" +
                "    \"C_DISPENSE_STATUS\": \"1\",\n" +
                "    \"L_APPLY_NO\": \"0\",\n" +
                "    \"L_DATE\": \"20210622\",\n" +
                "    \"D_HEART_BEAT\": \"2021-06-22 11:31:49\",\n" +
                "    \"L_CANCEL_DATE\": \"0\",\n" +
                "    \"L_INSTRUCTION_NO\": \"0\",\n" +
                "    \"L_SETTLE_LOCK_OPERATOR\": \"0\",\n" +
                "    \"C_BRANCH_STATUS\": \"0\",\n" +
                "    \"C_TREATYHG_FLAG\": \"0\",\n" +
                "    \"L_FEEDBACK_STATUS\": \"0\",\n" +
                "    \"C_PRICE_CONTROL_TYPE\": \"1\",\n" +
                "    \"L_APPROVE_OPERATOR\": \"0\",\n" +
                "    \"C_SEARCH_SOURCE\": \"0\",\n" +
                "    \"C_SPECIAL_FLAG\": \"0\",\n" +
                "    \"L_DIRECT_TIME\": \"113149\",\n" +
                "    \"L_SECOND_SETTLE_DATE\": \"0\",\n" +
                "    \"C_FLOW_APPROVE_STATUS\": \"2\",\n" +
                "    \"C_EXEC_PHASE\": \"0\",\n" +
                "    \"C_STOCK_TARGET_TYPE\": \"2\",\n" +
                "    \"C_ADVISE_TYPE\": \"0\",\n" +
                "    \"L_LIMIT_OPERATOR\": \"0\",\n" +
                "    \"C_DEAL_EXECUTE_FLAG\": \"1\",\n" +
                "    \"L_BEGIN_DATE\": \"20210622\",\n" +
                "    \"VC_UNIQUE_INSTRUCTION_NO\": \"73768\",\n" +
                "    \"L_OPERATOR_NO\": \"0\"\n" +
                "  },\n" +
                "  \"scntime\": 1624332709,\n" +
                "  \"rowid\": \"AAAINDAAFAAAr/IAAF\",\n" +
                "  \"scn\": \"696796269\"\n" +
                "}\n" +
                "\n" +
                "##############################################\n" +
                "\n" +
                "{\n" +
                "  \"owner\": \"TRADE\",\n" +
                "  \"op\": 0,\n" +
                "  \"optype\": \"INSERT\",\n" +
                "  \"actseq\": \"2.196690\",\n" +
                "  \"xid\": \"0x0004.004.00003b8b\",\n" +
                "  \"name\": \"TINSTRUCTIONSTOCK\",\n" +
                "  \"after_key\": {\n" +
                "    \"L_STOCK_SERIAL_NO\": \"3\",\n" +
                "    \"L_INDEX_DAILY_MODIFY\": \"1\",\n" +
                "    \"L_DAILY_INSTRUCTION_NO\": \"209830\"\n" +
                "  },\n" +
                "  \"jstime\": \"1636707530389000\",\n" +
                "  \"after\": {\n" +
                "    \"L_ENTURST_BONDLENDING_AMOUNT\": \"0\",\n" +
                "    \"EN_FACT_PRICE\": \"31.49\",\n" +
                "    \"L_BEGIN_TIME\": \"1\",\n" +
                "    \"VC_INTER_CODE\": \"000538SZ\",\n" +
                "    \"L_COMBI_ARBI_SETS\": \"0\",\n" +
                "    \"L_RIVALACCOUNT_NO\": \"0\",\n" +
                "    \"L_BASECOMBI_ID\": \"2\",\n" +
                "    \"C_CASH_CONTROL_TYPE\": \"1\",\n" +
                "    \"EN_COMBI_TARGET_RATIO\": \"0\",\n" +
                "    \"L_CONTRACT_NO\": \"0\",\n" +
                "    \"EN_INTEREST\": \"0\",\n" +
                "    \"L_END_TIME\": \"235959\",\n" +
                "    \"C_INVEST_TYPE\": \"1\",\n" +
                "    \"C_INSTRUCTION_STATUS\": \"1\",\n" +
                "    \"EN_PRICEBP\": \"0\",\n" +
                "    \"C_MATCH_STATUS\": \"0\",\n" +
                "    \"L_QUOTATION_OPERATOR\": \"0\",\n" +
                "    \"EN_TARGET_VALUE\": \"0\",\n" +
                "    \"EN_PREPAY_BALANCE\": \"0\",\n" +
                "    \"L_TOTAL_DEAL_AMOUNT\": \"0\",\n" +
                "    \"L_TOTAL_ENTRUST_AMOUNT\": \"0\",\n" +
                "    \"C_BUSIN_CLASS\": \"1\",\n" +
                "    \"L_END_DATE\": \"20210622\",\n" +
                "    \"L_FUND_ID\": \"2\",\n" +
                "    \"L_TODAY_DEAL_AMOUNT\": \"0\",\n" +
                "    \"EN_TODAY_DEAL_BALANCE\": \"0\",\n" +
                "    \"L_DEPT_ID\": \"0\",\n" +
                "    \"EN_EARNEST_BALANCE\": \"0\",\n" +
                "    \"L_SETTLE_SPEED\": \"1\",\n" +
                "    \"L_DAILY_INSTRUCTION_NO\": \"209830\",\n" +
                "    \"EN_BASIS\": \"0\",\n" +
                "    \"L_AMOUNT\": \"400\",\n" +
                "    \"C_DEAL_EXECUTE_STATUS\": \"1\",\n" +
                "    \"L_ALGO_UNENTRUST_AMOUNT\": \"0\",\n" +
                "    \"L_OTHER_COMBI_ID\": \"0\",\n" +
                "    \"EN_TODAY_ENTRUST_BALANCE\": \"0\",\n" +
                "    \"L_RESTRICTED_NO\": \"0\",\n" +
                "    \"EN_CONTRACT_BALANCE\": \"0\",\n" +
                "    \"L_TODAY_ENTRUST_AMOUNT\": \"0\",\n" +
                "    \"EN_TOTAL_ENTRUST_BALANCE\": \"0\",\n" +
                "    \"L_COMBI_TOENTR_SETS\": \"0\",\n" +
                "    \"C_ENTRUST_DIRECTION\": \"1\",\n" +
                "    \"L_DATE\": \"20210622\",\n" +
                "    \"EN_INSTR_TARGET_RATIO\": \"0\",\n" +
                "    \"C_AMOUNT_BALANCE_FLAG\": \"0\",\n" +
                "    \"EN_PRICE2\": \"0\",\n" +
                "    \"L_FIRST_SETTLE_DATE\": \"0\",\n" +
                "    \"EN_PRICE1\": \"31.49\",\n" +
                "    \"EN_ESTIMATE_FEE\": \"0\",\n" +
                "    \"EN_SPRING_PRICE\": \"0\",\n" +
                "    \"C_PRICE_TYPE\": \"1\",\n" +
                "    \"L_STOCK_SERIAL_NO\": \"3\",\n" +
                "    \"L_DEAL_BONDLENDING_AMOUNT\": \"0\",\n" +
                "    \"EN_FEE\": \"0\",\n" +
                "    \"L_TRADE_RIVAL_NO\": \"0\",\n" +
                "    \"C_RISK_INFLUENCE_FLAG\": \"0\",\n" +
                "    \"C_STOCK_CONTROL_TYPE\": \"N\",\n" +
                "    \"L_SECOND_SETTLE_DATE\": \"0\",\n" +
                "    \"EN_DAY_AVG_PRICE\": \"0\",\n" +
                "    \"EN_BALANCE\": \"12596\",\n" +
                "    \"L_VIRTUAL_COMBI_ID\": \"0\",\n" +
                "    \"C_EXPORT_FLAG\": \"0\",\n" +
                "    \"L_BONDLENDING_AMOUNT\": \"0\",\n" +
                "    \"L_ORG_ID\": \"0\",\n" +
                "    \"EN_ALGO_UNENTRUST_BALANCE\": \"0\",\n" +
                "    \"EN_CUM_AVG_PRICE\": \"0\",\n" +
                "    \"L_INDEX_DAILY_MODIFY\": \"1\",\n" +
                "    \"EN_RISK_GGT\": \"0\",\n" +
                "    \"EN_DAILY_MAX\": \"0\",\n" +
                "    \"L_BEGIN_DATE\": \"20210622\",\n" +
                "    \"L_OTHER_FUND_ID\": \"2\",\n" +
                "    \"EN_PROFIT_RATIO\": \"0\",\n" +
                "    \"C_ENTRUST_EXECUTE_STATUS\": \"1\",\n" +
                "    \"EN_TOTAL_DEAL_BALANCE\": \"0\"\n" +
                "  },\n" +
                "  \"scntime\": 1624332709,\n" +
                "  \"rowid\": \"AAAUaPAAFAAAsNpAAL\"\n" +
                "}";

        String[] split = s.split("#{5,}");
        Arrays.stream(split).forEach(s1->{
            System.out.println("111111");
            System.out.println(s1.trim());
        });
    }
}
